package com.study.bob.singleTon;

/**
 * Created by bob on 2016/5/2.
 */
public class StaticBlockSingleton {
    private static StaticBlockSingleton instance ;

    static {
        try{
            instance = new StaticBlockSingleton();
        }catch (Exception e){
            throw new RuntimeException("静态代码块中实例化失败");
        }

    }

    public static StaticBlockSingleton getInstance(){
        return instance;
    }

}
